import CodeBlock from '@theme/CodeBlock';
import source from '!!raw-loader!./working-with-CMS-certificate-based-encryption.example';

# Working with CMS Certificate-based Encryption

In this example, you will see how to create and decrypt an Enveloped CMS message using an existing X.509 certificate. 

<CodeBlock language="ts">
  {source}
</CodeBlock>
